package DesignPatern.A14_迭代器模式.QSB.A02_基本模式;

/**
 * @Author: Du
 * @Date: 2021/8/2 8:12
 */
public class A01_Main
{
    public static void main(String[] args)
    {
        IProject project = new Project();
        
        project.add("项目1", 10, 1000);
        project.add("项目2", 110, 11000);
        project.add("项目3", 1110, 111000);
        
        IProjectIterator it = project.iterator();
        while (it.hasNext())
        {
            IProject p = (IProject) it.next();
            System.out.println(p.getProjectInfo());
        }
    }
}
